namespace Discovery.Protocol
{
    using System;
    using System.Xml;
    using System.Xml.Serialization;
    using System.Collections.Generic;
    using System.Threading;
    using System.ServiceModel;
    using System.ServiceModel.Description;
    
    /*
    class Finder : IDisposable, FindResponseContract
    {
        private DuplexChannelFactory<FindContract> factory;
        private bool disposed;
        private List<ServiceProperties> results;
        private IncrementalResultsCallback callback;
        private FindContract channel;
        
        public Finder(DuplexChannelFactory<FindContract> factory, Probe probe)
        {
            this.factory = factory;
            this.disposed = false;
        }

        public Finder(DuplexChannelFactory<FindContract> factory,
            Resolve probe)
        {
            this.factory = factory;
            this.disposed = false;
        }

        public void SendProbe(Probe probe)
        {
            if (probe == null)
                throw new ArgumentNullException("probe");

            ProbeMessage message = new ProbeMessage();
            message.Probe = probe;

            IClientChannel clientChannel = (IClientChannel)this.channel;
            using (new OperationContextScope(clientChannel))
            {
                OperationContext.Current.OutgoingMessageHeaders.ReplyTo = clientChannel.LocalAddress;
                OperationContext.Current.OutgoingMessageHeaders.MessageId = new UniqueId();
                this.channel.ProbeOp(message);
            }
        }

        #region FindResponseContract Members

        public void ProbeMatchOp(ProbeMatchesMessage response)
        {
            Console.WriteLine("Received ProbeMatch");
        }

        public void ResolveMatchOp(ResolveMatchesMessage resolve)
        {

        }

        #endregion

        #region IDisposable Members

        ~Finder()
        {
            this.Dispose(false);
        }

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        private void Dispose(bool disposing)
        {
            if (!this.disposed)
            {
                if (disposing)
                {
                    if (this.channel != null)
                        ((IClientChannel)(this.channel)).Dispose();
                }

                this.disposed = true;
            }
        }

        #endregion

        #region FindResponseContract Members


        public void HelloOp(HelloMessage message)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        #endregion
      
    }
    */
}
